package com.log.biz;

import com.log.entity.Logs;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * @author: zwj
 * @description:
 * @data: 2021/2/24
 **/
@Service
public class LogBiz {


    public List<Logs> selectListAll() {
        List<Logs> logs = new ArrayList<>();
        return logs;
    }

    public void download(List<Logs> logs, HttpServletResponse response) throws IOException {
        List<Map<String, Object>> list = new ArrayList<>();
        for (Logs log : logs) {
            Map<String, Object> map = new LinkedHashMap<>();
            map.put("用户名", log.getUsername());
            map.put("IP", log.getRequestIp());
        }
    }
}